<template>
  <div>
    <el-button @click="onClick">test</el-button>
  </div>
</template>

<script setup lang="ts">
import db from '~~/DB';

definePageMeta({
  // layout: 'main',
  auth: false,
});
async function onClick() {
  // console.log('🚀 ~ file: test.vue:9 ~ db:', db);
  // await db.open();
  // const user = await db.users.get(1);
  // console.log('🚀 ~ file: test.vue:18 ~ onClick ~ user:', user);
  const res = await $fetchApi('/test');
  console.log('🚀 ~ file: test.vue:14 ~ onClick ~ res:', res);
}
</script>

<style lang="scss" scoped></style>
